package com.xyy.ebattery.tcp.start.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ResourceBundleMessageSource;

/**
 * @Description TODO
 * @Author JIA BOYAN
 * Date 2025/6/16 12:42
 */
@Configuration
@ComponentScan("com.xyy.ebattery")
@ComponentScan("com.xyy.common")
@ComponentScan("com.xyy.dto")
public class ApplicationConfig {

    /**
     * i18n Bean 配置
     *
     * @return
     */
    @Bean
    public ResourceBundleMessageSource messageSource() {
        ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
        messageSource.setDefaultEncoding("UTF-8");
        messageSource.addBasenames("i18n/msgcode", "i18n/msg");

        return messageSource;
    }
}
